home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
AmiTCPsesn1_1.lha
/
AmiTCP_session-1.1
/
c
/
nntpcopy.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-06-16
|
1KB
|
44 lines
/*
* nntpcopy version 1.1
*
* ARexx script to copy a news article into uunews:NNTPSpoolDir
* A unique filename is created before copying the article
* Usage: nntpcopy <article>
*
* Written by David Jameson (dave@freeside.thegap.com), 1994.
*/
arg args
/* Open RexxSupport library */
if ~show('L', 'rexxsupport.library') then do
if addlib('rexxsupport.library', 0, -30, 0) then
say 'added rexxsupport.library'
else do
say 'failed to open rexxsupport.library'
exit 10
end
end
date = date()
parse var date day month year .
time = time()
parse var time hour ':' min ':' sec
filename = 'article.'||hour||'.'||min||'.'||sec||'.'||day||month||year
if exists('uunews:NNTPSpoolDir/'||filename) then do
say 'Error: temporary file already exists'
exit 20
end
/* Copy file into NNTPSpoolDir */
address command
'copy' args 'uunews:NNTPSpoolDir/'||filename||' >t:'||filename
ret_val = statef('t:'||filename) /* major kludge... */
parse var ret_val type size ignore
if size ~= 0 then exit 10 /* copy failed */
exit 0